<div class="bg-light lter b-b wrapper-md ng-scope">
  <h1 class="m-n font-thin h3 ng-binding">个人信息</h1>
</div>

<div class="wrapper-md ng-scope">
	<div class="row">

		<div class="panel panel-default">
			<div class="panel-heading font-bold"></div>
			<div class="panel-body">
				<form name="form" class="form-horizontal ng-valid ng-valid-required">
					<!-- <div class="form-group">
						<label class="col-lg-3 control-label">头像:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-model="obj.photo">
						</div>
					</div> -->
					<div class="form-group">
						<label class="col-lg-3 control-label">归属公司:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="true" ng-model="obj.office_name">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">登录名:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="true" ng-model="obj.login_name">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">工号:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="set" ng-model="obj.no">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">姓名:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="set" placeholder="必填" ng-model="obj.name">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">邮箱:</label>
						<div class="col-lg-5">
							<input type="email" name="email" class="form-control" ng-disabled="set" ng-model="obj.email">
						</div>
						<label class="control-label" ng-show="form.email.$dirty" style="color:red">
							<span ng-show="form.email.$invalid && !form.email.$error.required" class="ng-hide">邮箱格式不正确!</span>
						</label>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">电话:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="set" ng-model="obj.phone">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">手机:</label>
						<div class="col-lg-5">
							<input type="text" class="form-control" ng-disabled="set" ng-model="obj.mobile">
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">允许登录:</label>
						<div class="col-lg-5">
							<label class="i-switch m-t-xs m-r">
								<input type="checkbox" ng-model="obj.login_flag" ng-disabled="set" ng-true-value="'1'" ng-false-value="'0'"
									class="ng-pristine ng-untouched ng-valid ng-not-empty" ng-init="obj.login_flag='1'">
								<i></i>
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">用户类型:</label>
						<div class="col-lg-5">
							<select ng-model="obj.user_type" class="form-control" ng-disabled="set">
								<option value="">请选择</option>
								<option value="1">系统管理</option>
								<option value="2">部门经理</option>
								<option value="3">普通用户</option>
								<option value="9">接口对接</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">用户角色:</label>
						<div class="col-lg-7">
							<label ng-repeat="info in roleList" style="margin-bottom:2px; margin-right:2px; width:116px" 
							class="btn btn-xs btn-default active">
								<span class="text">{{info.name}}</span>
								<i class="fa fa-check text-active"></i>
								<span class="text-active">{{info.name}}</span>    
							</label>
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">备注:</label>
						<div class="col-lg-5">
							<textarea class="form-control" rows="3" ng-disabled="set" ng-model="obj.remarks"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">创建时间:</label>
						<div class="col-lg-5">
							<label class="control-label">{{obj.create_date}}</label>
						</div>
					</div>
					<div class="form-group">
						<label class="col-lg-3 control-label">最后登录:</label>
						<div class="col-lg-5">
							<label class="col-lg-12">IP: {{obj.login_ip}}</label>
							<label class="col-lg-12">时间: {{obj.login_date}}</label>
						</div>
					</div>
					<div class="col-lg-3"></div>
					<div class="col-lg-4">
						<button class="btn btn-primary btn-rounded" ng-if="set" ng-click="update()">修改信息</button>
						<button class="btn btn-primary btn-rounded" ng-if="!set" ng-click="save()">保存</button>
					</div>

				</form>

			</div>
		</div>

	</div>
</div>


